<?php
	$mode=$_GET['mode'];
	$obj=new Customer();
	$obj->CustomerID=$_POST['CustomerID'];
	$obj->CustomerName=$_POST['CustomerName'];
	$obj->Email=$_POST['Email'];
	$obj->Address=$_POST['Address'];
	$obj->ShippingAddress=$_POST['ShippingAddress'];
	$obj->Tel=$_POST['Tel'];
	$obj->Cellphone=$_POST['Cellphone'];
	$obj->Pass=$_POST['Pass'];
	$obj->Company=$_POST['Company'];
	
	if($mode=="add")
	{
		$obj->insert($conn);
	}
	if($mode=="update")
	{
		$obj->update($conn);
	}
	if($mode=="del")
	{
		$obj->CustomerID=$id;
		$obj->delete($conn);
	}
	$url="?module=$module";
	echo "<script language='JavaScript'> window.location = '".$url."'</script>";
?>